/**
 * $Id: KBWorkspaceModel.java,v 1.1 2009-08-13 17:51:24 chris Exp $
 */
package uk.ac.manchester.tewpl.iceiface.client.model;

import com.extjs.gxt.ui.client.data.BaseModelData;
import com.google.gwt.user.client.rpc.IsSerializable;

/**
 * @author chris
 *
 */
public class KBWorkspaceModel extends BaseModelData implements IsSerializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 5654335214201654851L;
	public static final String ID = "id";
	public static final String URI = "uri";
	public static final String KBINFO = "kbInfo";
	public static final String COMMUNITY = "community";
	
	//Community
	public void setCommunity(KBCommunityModel community){
		set(COMMUNITY, community);
	}
	public KBCommunityModel getCommunity(){
		return get(COMMUNITY);
	}
	
	//WORKSPACE
	public void setKbInfo(KBInfoModel kbInfo){
		set(KBINFO, kbInfo);
	}
	public KBInfoModel getKbInfo(){
		return get(KBINFO);
	}
	
	//ID
	public void setId(Long id){
		set(ID, id);
	}
	public Long getId(){
		return get(ID);
	}
	
	//URI
	public void setUri(String uri){
		set(URI, uri);
	}
	public String getUri(){
		return get(URI);
	}
	public String getName() {
		return getKbInfo().getName()+" @ "+getCommunity().getName();
	}
	
	
}
